package com.test;

import java.io.*;
import java.net.*;

public class Service {
public static void main(String[] args) throws IOException {
	ServerSocket ss=new ServerSocket(4111);
	while(true){
	Socket socket=ss.accept();
	BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));
	BufferedReader br=new BufferedReader(new InputStreamReader(socket.getInputStream()));
	bw.write("I'm Service,shiy\n\t");
	bw.flush();
	System.out.println(br.readLine());
	System.out.println(22222);
	System.out.println(br.readLine());
	socket.close();
	}
}
}
  